/*
    Copyright 2013 Jonathan Kaschak

    This file is part of TerraTamper.

    TerraTamper is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    TerraTamper is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with TerraTamper.  If not, see <http://www.gnu.org/licenses/>.
*/

package Packets;

import static Main.TerrariaProtocol.*;

public class SpawnBoss {
    public static int packet_id = 61;
    
    static byte[] packet = { 9, 0, 0, 0, 61, 1, 0, 0, 0, 50, 0, 0, 0 };
    static int player_id = 5;
    static int type = 9;
    
    public static byte[] SpawnBossInvasion(int in_player_id, int in_type){
        byte[] data = packet;
        
        byte[] temp = int322byte(in_player_id);
            data[player_id] = temp[0];
            data[player_id+1] = temp[1];
            data[player_id+2] = temp[2];
            data[player_id+3] = temp[3];
        
        temp = int322byte(in_type);
            data[type] = temp[0];
            data[type+1] = temp[1];
            data[type+2] = temp[2];
            data[type+3] = temp[3];
            
        return data;
    }
}
